home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 18247 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.2 KB  |  33 lines

  1. Newsgroups: comp.lang.c++,comp.os.ms-windows.programmer.misc,comp.os.ms-windows.programmer.tools.misc
  2. Path: dmocc2.on.bell.ca!bc2cep!news
  3. From: Eric Marc Loebenberg <loebenbe@qc.bell.ca>
  4. Subject: Using CreateProcess
  5. X-Nntp-Posting-Host: cmocft.qc.bell.ca
  6. Content-Type: text/plain; charset=iso-8859-1
  7. Message-ID: <31779265.A80@qc.bell.ca>
  8. Sender: news@on.bell.ca (news admin)
  9. Content-Transfer-Encoding: 8bit
  10. Organization: Bell Sygma
  11. Mime-Version: 1.0
  12. Date: Fri, 19 Apr 1996 13:17:25 GMT
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. Does anyone have an example of using CreateProcess.  I am trying to
  16. simply use CreateProcess to invoke WORDPAD.EXE but get an Access
  17. Violation when trying.  Thanks.
  18.  
  19. PROCESS_INFORMATION pi;
  20. char cBuffer[100];  // contains " c:\fred.dat"  for example
  21. BOOL bSuccess = CreateProcess("WORDPAD.EXE", cBuffer, NULL, NULL, FALSE,
  22.  CREATE_DEFAULT_ERROR_MODE | CREATE_NEW_PROCESS_GROUP, NULL, NULL, NULL, 
  23. &pi);
  24.  
  25. -- 
  26. ***************************************************************
  27.   Eric Marc Loebenberg                  loebenbe@qc.bell.ca
  28.   Bell Sygma Inc.                   or: loebenbe@post.sygma.net
  29.   700 de la GauchetiΦre West       Tel: 514-870-0465
  30.   Room 14W1                        Fax: 514-870-7583
  31.   Montreal, Quebec, Canada
  32.   H3B 4L1
  33.